package com.ruoyi.teaching.service.impl;

import java.util.List;

import com.ruoyi.teaching.bo.YaStudentTasksSubmitIBo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.teaching.mapper.YaStageTaskSubmitMapper;
import com.ruoyi.teaching.domain.YaStageTaskSubmit;
import com.ruoyi.teaching.service.IYaStageTaskSubmitService;

/**
 * 任务提交Service业务层处理
 * 
 * @author ZBX
 * @date 2025-03-12
 */
@Service
public class YaStageTaskSubmitServiceImpl implements IYaStageTaskSubmitService 
{
    @Autowired
    private YaStageTaskSubmitMapper yaStageTaskSubmitMapper;

    /**
     * 查询任务提交
     * 
     * @param taskId 任务提交主键
     * @return 任务提交
     */
    @Override
    public YaStageTaskSubmit selectYaStageTaskSubmitByTaskId(Long taskId)
    {
        return yaStageTaskSubmitMapper.selectYaStageTaskSubmitByTaskId(taskId);
    }

    /**
     * 查询任务提交列表
     * 
     * @param yaStageTaskSubmit 任务提交
     * @return 任务提交
     */
    @Override
    public List<YaStudentTasksSubmitIBo> selectYaStageTaskSubmitList(YaStageTaskSubmit yaStageTaskSubmit)
    {
        return yaStageTaskSubmitMapper.selectYaStageTaskSubmitList(yaStageTaskSubmit);
    }

    /**
     * 新增任务提交
     * 
     * @param yaStageTaskSubmit 任务提交
     * @return 结果
     */
    @Override
    public int insertYaStageTaskSubmit(YaStageTaskSubmit yaStageTaskSubmit)
    {
        return yaStageTaskSubmitMapper.insertYaStageTaskSubmit(yaStageTaskSubmit);
    }

    /**
     * 修改任务提交
     * 
     * @param yaStageTaskSubmit 任务提交
     * @return 结果
     */
    @Override
    public int updateYaStageTaskSubmit(YaStageTaskSubmit yaStageTaskSubmit)
    {
        return yaStageTaskSubmitMapper.updateYaStageTaskSubmit(yaStageTaskSubmit);
    }

    /**
     * 批量删除任务提交
     * 
     * @param taskIds 需要删除的任务提交主键
     * @return 结果
     */
    @Override
    public int deleteYaStageTaskSubmitByTaskIds(Long[] taskIds)
    {
        return yaStageTaskSubmitMapper.deleteYaStageTaskSubmitByTaskIds(taskIds);
    }

    /**
     * 删除任务提交信息
     * 
     * @param taskId 任务提交主键
     * @return 结果
     */
    @Override
    public int deleteYaStageTaskSubmitByTaskId(Long taskId)
    {
        return yaStageTaskSubmitMapper.deleteYaStageTaskSubmitByTaskId(taskId);
    }

    @Override
    public void insertStageTaskSubmit(YaStageTaskSubmit yaStageTaskSubmit) {
        yaStageTaskSubmitMapper.insertYaStageTaskSubmit(yaStageTaskSubmit);
    }

    @Override
    public void editStageTaskSubmit(YaStageTaskSubmit yaStageTaskSubmit) {
        yaStageTaskSubmitMapper.updateYaStageTaskSubmit(yaStageTaskSubmit);
    }
}
